{{define "menu"}}
    <aside class="main-sidebar">
        <section class="sidebar">
            <ul class="sidebar-menu tree" data-widget="tree">
                <li class="header">检测报告</li>
                <li class="active">
                    <a href="/admin/reports/github/">
                        <i class="fa fa-dashboard"></i>
                        <span>源代码搜索报告</span>
                    </a>
                </li>
                <li>
                    <a href="/admin/reports/subdomain/">
                        <i class="fa fa-book"></i>
                        <span>子域名资产报告</span>
                    </a>
                </li>
                <li>
                    <a href="/admin/reports/app/">
                        <i class="fa fa-dashboard"></i>
                        <span>APP 搜索报告</span>
                    </a>
                </li>
                {{if .role}}
                    {{if eq .role "admin"}}
                        <li class="header">后台管理</li>
                        <li><a href="/admin/assets/"><i class="fa fa-rmb"></i> <span>资产管理</span></a></li>
                        <li><a href="/admin/repos/"><i class="fa fa-link"></i> <span>仓库管理</span></a></li>
                        <li class="treeview">
                            <a>
                                <i class="fa fa-link"></i>
                                <span>规则管理</span>
                                <span class="pull-right-container">
                                <i class="fa fa-angle-left pull-right"></i>
                            </span>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="/admin/rules/"><i class="fa fa-link"></i> <span>普通规则</span></a></li>
                                <li><a href="/admin/filterrules/"><i class="fa fa-link"></i> <span>过滤规则</span></a></li>
                            </ul>
                        </li>
                        <li><a href="/admin/tokens/"><i class="fa fa-users"></i> <span>token管理</span></a></li>
                        <li><a href="/admin/users/"><i class="fa fa-users"></i> <span>用户管理</span></a></li>
                    {{end}}
                {{end}}
            </ul>
        </section>
    </aside>
{{end}}